# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=luksmeta
pkgver=9
pkgrel=0
pkgdesc="Library for storing metadata in the LUKSv1 header"
url="https://github.com/latchset/luksmeta"
license="LGPL-2.0-or-later"
arch="all"
makedepends="autoconf automake libtool asciidoc cryptsetup-dev"
checkdepends="bash cryptsetup"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/latchset/luksmeta/archive/v$pkgver/luksmeta-$pkgver.tar.gz
	force-creation-of-luks1-containers-in-tests.patch
	relax-content-tests-in-test-suite.patch
	musl.patch
	"

prepare() {
	default_prepare

	autoreconf -fi
}

build() {
	./configure --prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
874331988fe2648d4924779b348f190ed5c6e4d71da4ad027f176e3f8dcbc78fc26e9f9b8402a97437db5b884db31b72598afc70e025cd8533168a5986417a76  luksmeta-9.tar.gz
a97a000c8bd952fb5a6569ef111bdef5acd56d75bd6bc1f3be3b44113ec6d313400961d018ebe442aa214ac6e8aba41bcce838cb5e34cacd3f84d012910ae729  force-creation-of-luks1-containers-in-tests.patch
6821e042fcc182dbb7c534a2108d486600c87d3c30fa02491cf6cb47867de85bab6f1fdb13c701bab53a794a9d5559e78dc5a9e53cc169d8792e754dee927741  relax-content-tests-in-test-suite.patch
aec3e5b91464a71e33ca7e53c51924cf99b5a7048923bf253c88587d607d763c6671c2fa89c21c0447020368487270dd31f65a40477d277880a9f12d6569431e  musl.patch
"
